import request from "../utils/request";

/**
 * 获取要闻
 */
export const getHighlight = (data) => {
    return request({
        url: "/medicine/highlightList",
        method: "GET",
        params: data
    });
};

/**
 * 获取文章内容
 */
export const getArticleContent = (data) => {
    return request({
        url: "/article/articleContent",
        method: "GET",
        params: data
    });
};

/**
 * 获取文章内容
 */
export const getCultureList = (data) => {
    return request({
        url: "/medicine/cultureList",
        method: "GET",
        params: data
    });
};

/**
 * 获取草药信息
 */
export const getMedicineList = (data) => {
    return request({
        url: "/medicine/medicineList",
        method: "GET",
        params: data
    });
};

/**
 * 获取草药信息
 */
export const getDoctor = () => {
    return request({
        url: "/medicine/getDoctor",
        method: "GET"
    });
};

/**
 * 获取草药信息
 */
export const getSolar = () => {
    return request({
        url: "/medicine/getSolar",
        method: "GET"
    });
};

/**
 * 发送评论
 */
export const postComment = (data) => {
    return request({
        url: "/comment/postComment",
        method: "GET",
        params: data
    });
};

/**
 * 获取评论
 */
export const getComment = (data) => {
    return request({
        url: "/comment/getComment",
        method: "GET",
        params: data
    });
};

/**
 * 获取一言
 */
export const getYiYan = () => {
    return request({
        url: "/articleIndex/yiyan",
        method: "GET"
    });
};

/**
 * 获取文章列表
 */
export const getArticleList = (data) => {
    return request({
        url: "/articleIndex/getArticleList",
        method: "GET",
        params:data
    });
};

/**
 * 获取友链
 */
export const getLinks = () => {
    return request({
        url: "/info/getLinks",
        method: "GET"
    });
};

/**
 * 获取文章种类
 */
export const getCategoryList = () => {
    return request({
        url: "/info/getCategoryList",
        method: "GET"
    });
};

/**
 * 获取近期新闻
 */
export const getNews = () => {
    return request({
        url: "/info/getNews",
        method: "GET"
    });
};
